<?php

/**
 * 在布局中访问其他数据：只能通过拉取方式访问数据
 *   拉取控制器数据 $this->context->id;
 *   拉取
 *
 * 从内容视图中传递数据到布局通过视图间共享数据方式
 * $this->params
 *
 * @var string $content
 * @var \yii\web\View $this
 */

use yii\helpers\Html;
use yii\helpers\Url;
use app\models\Member;
use app\models\SysConfig;
use app\assets\AppAsset;
use app\models\Message;
use app\models\Notice;
use yii\data\ActiveDataProvider;
use yii\widgets\ListView;
AppAsset::register($this);
$notices = Notice::find()->select(['content'])->orderBy(['dt'=>SORT_DESC])->limit(1)->all();
?>
<?php $this->beginPage(); ?>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="ie-comp">
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
  </head>
  <body class="sidebar-mini fixed">
    <?php $this->beginBody() ?>
    <div class="wrapper">
      <!-- Navbar-->
      <header class="main-header hidden-print">
        <a class="logo" href="<?=Url::toRoute('site/index')?>">
          <img class="img-responsive" src="<?=Url::toRoute(['images/logo.png','rand'=>time()])?>" alt="User Image" style='height:100%;width:auto;'>
        </a>
        <nav class="navbar navbar-static-top">
          <!-- Sidebar toggle button--><a class="sidebar-toggle" href="#" data-toggle="offcanvas"></a>
          <!-- Navbar Right Menu-->


          <div class="navbar-left" style='position:absolute;left:50px;padding-right:20px;right:0;'>
            <marquee style='color:red;valign:center;line-height:50px;' behavior="scroll" direction="left" width='100%' height='50px' scrollamount="2">
              <?php
                if(!is_null($notices))
                {
                  if(count($notices)>0){
                    echo "公告内容：".$notices[0]->content;
                  }
                }
              ?>
            </marquee>
          </div>
        </nav>
      </header>
      <!-- Side-Nav-->
      <aside class="main-sidebar hidden-print">
        <section class="sidebar">
          <div class="user-panel" style='height:60px;margin-top:5px;margin-bottom:5px;'>
            <!--div class="pull-left image"><img class="img-circle" src="images/administer.jpg" alt="User Image"></div-->
            <div class="info" style='left:8px;'>

              <p><?php echo Html::encode($this->context->curUserIsAdmin?'超级管理员':'普通会员')?></p>
              <p class="designation"><?php echo Html::encode($this->context->user->name)?></p>
            </div>
          </div>
          <!-- Sidebar Menu-->
          <?php
          if($this->context->curUserIsAdmin){
          ?>
          <ul class="sidebar-menu">
            <li class="treeview"><a href="#"><i class="fa fa-area-chart"></i><span>基金走势图</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li class="active"><a href="<?=Url::toRoute('site/neazoushi')?>"><i class="fa fa-area-chart"></i><span>基金走势图</span></a>
                <li><a href="<?=Url::toRoute('site/makekline')?>"><i class="fa fa-circle-o"></i> 导入K线数据</a></li>
                <li><a href="<?=Url::toRoute('site/editkline')?>"><i class="fa fa-circle-o"></i> 编辑K线数据</a></li>
              </ul>
            </li>
            <!--li class="treeview"><a href="<?=Url::toRoute('site/zijinhuzhuanprove')?>"><i class="fa fa-cog"></i><span>会员资金互转审核</span></a></li-->
            <li class="treeview"><a href="<?=Url::toRoute('site/zijinhuzhuanconfig')?>"><i class="fa fa-cog"></i><span>会员资金互转管理</span></a></li>
            <li class="treeview"><a href="#"><i class="fa fa-trophy"></i><span>会员福利设置</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/fenhong')?>"><i class="fa fa-circle-o"></i> 静态分红</a></li>
                <li><a href="<?=Url::toRoute('site/tuijian')?>"><i class="fa fa-circle-o"></i> 推荐奖</a></li>
                <li><a href="<?=Url::toRoute('site/seventuijian')?>"><i class="fa fa-circle-o"></i> 会员推荐奖拿下面七代</a></li>
                <li><a href="<?=Url::toRoute('site/lindao')?>"><i class="fa fa-circle-o"></i> 领导奖</a></li>
                <li><a href="<?=Url::toRoute('site/congzhifanhuan')?>"><i class="fa fa-circle-o"></i> 会员充值返还奖励</a></li>
              </ul>
            </li>
            <li><a href="#"><i class="fa fa-money"></i><span>会员充值和提现管理</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/channelconfig')?>"><i class="fa fa-circle-o"></i> 会员充值通道设置</a></li>
                <li><a href="<?=Url::toRoute('site/congzhiprove')?>"><i class="fa fa-circle-o"></i> 会员支付宝充值审核</a></li>
                <li><a href="<?=Url::toRoute('site/congzhiok')?>"><i class="fa fa-circle-o"></i> 会员充值成功记录</a></li>
                <li><a href="<?=Url::toRoute('site/congzhifail')?>"><i class="fa fa-circle-o"></i> 会员充值失败记录</a></li>
                <li><a href="<?=Url::toRoute('site/tixianprove')?>"><i class="fa fa-circle-o"></i> 会员提现申请管理</a></li>
                <li><a href="<?=Url::toRoute('site/tixianok')?>"><i class="fa fa-circle-o"></i> 会员提现成功记录</a></li>
                <li><a href="<?=Url::toRoute('site/tixianfail')?>"><i class="fa fa-circle-o"></i> 会员提现失败记录</a></li>
              </ul>
            </li>
            <li class="treeview"><a href="<?=Url::toRoute('site/messages')?>"><i class="fa fa-envelope"></i><span>消息管理</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/notice')?>"><i class="fa fa-bullhorn"></i><span>向会员发布系统公告</span></a></li>
            <li class="treeview"><a href="#"><i class="fa fa-users"></i><span>会员管理</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/reguser')?>"><i class="fa fa-circle-o"></i> 会员注册</a></li>
                <li><a href="<?=Url::toRoute('site/regprove')?>"><i class="fa fa-circle-o"></i> 会员注册申请管理</a></li>
                <li><a href="<?=Url::toRoute('site/users')?>"><i class="fa fa-circle-o"></i> 会员注册信息查看和修改</a></li>
                <li><a href="<?=Url::toRoute('site/changepw')?>"><i class="fa fa-circle-o"></i> 修改会员登录密码</a></li>
                <li><a href="<?=Url::toRoute('site/forbiduser')?>"><i class="fa fa-circle-o"></i> 禁止/允许全部会员登录</a></li>
              </ul>
            </li>
            <li class="treeview"><a href="#"><i class="fa fa-users"></i><span>支付管理</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/sxyconfig')?>"><i class="fa fa-circle-o"></i> 首信易支付</a></li>
                <li><a href="<?=Url::toRoute('site/weixinconfig')?>"><i class="fa fa-circle-o"></i> 微信支付</a></li>
                <li><a href="<?=Url::toRoute('site/alipayconfig')?>"><i class="fa fa-circle-o"></i> 个人支付宝支付</a></li>
              </ul>
            </li>
            <li class="treeview"><a href="<?=Url::toRoute('site/sysconfig')?>"><i class="fa fa-cog"></i><span>系统设置</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/logout')?>"><i class="fa fa-sign-out"></i><span>退出系统</span></a></li>
          </ul>
          <?php
        }else{
          ?>
          <ul class="sidebar-menu">
            <li class="active"><a href="<?=Url::toRoute('site/neazoushi')?>"><i class="fa fa-area-chart"></i><span>基金走势图</span></a></li>
            <li class="treeview"><a href="#"><i class="fa fa-bank"></i><span>账户管理</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/zijinhuzhuan')?>"><i class="fa fa-circle-o"></i> 资金互转</a></li>
                <li><a href="<?=Url::toRoute('site/viewzijinhuzhuan')?>"><i class="fa fa-circle-o"></i> 资金互转记录</a></li>
                <li><a href="<?=Url::toRoute('site/changepw')?>"><i class="fa fa-circle-o"></i> 修改本人账户密码</a></li>
              </ul>
            </li>
            <li class="treeview"><a href="#"><i class="fa fa-money"></i><span>充值和提现</span><i class="fa fa-angle-right"></i></a>
              <ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/wizardcongzhi')?>"><i class="fa fa-circle-o"></i> 充值</a></li>
                <li><a href="<?=Url::toRoute('site/congzhi2')?>"><i class="fa fa-circle-o"></i> 充值记录</a></li>
                <li><a href="<?=Url::toRoute('site/tixianreg')?>"><i class="fa fa-circle-o"></i> 提现</a></li>
                <li><a href="<?=Url::toRoute('site/tixian2')?>"><i class="fa fa-circle-o"></i> 提现记录</a></li>
              </ul>
            </li>
            <li class="treeview"><a href="<?=Url::toRoute('site/user')?>"><i class="fa fa-book"></i><span>查看个人信息</span></a></li>
              <!--ul class="treeview-menu">
                <li><a href="<?=Url::toRoute('site/user')?>"><i class="fa fa-circle-o"></i> 查看个人信息</a></li>
                <li><a href="<?=Url::toRoute('site/editprofile')?>"><i class="fa fa-circle-o"></i> 修改个人信息</a></li>
              </ul>
            </li-->
            <li class="treeview"><a href="<?=Url::toRoute('site/usdcount')?>"><i class="fa fa-dollar"></i><span>个人账户金额</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/neacount')?>"><i class="fa fa-line-chart"></i><span>私募基金账户金额</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/messages')?>"><i class="fa fa-envelope"></i><span>消息管理</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/notice')?>"><i class="fa fa-bullhorn"></i><span>查看系统公告</span></a></li>
            <li class="treeview"><a href="<?=Url::toRoute('site/logout')?>"><i class="fa fa-sign-out"></i><span>退出系统</span></a></li>
          </ul>
          <?php
        }
           ?>
        </section>
      </aside>

      <div class="content-wrapper">
        <?= $content ?>
      </div>

    </div>
<!-- /footer content -->
<?php $this->endBody(); ?>
</body>
</html>
<?php $this->endPage(); ?>
